import mongoose from 'mongoose';
import HouseModel from './model/house';
import baseConfig from '../config/server';
import app from './index';
app;
mongoose.connect(
    baseConfig.db.url,
    {
        dbName: baseConfig.db.name,
        useNewUrlParser: true,
        user: baseConfig.db.username,
        pass: baseConfig.db.password,
        useUnifiedTopology: true,
    },
    async err => {
        if (err) {
            console.error(err);
            return;
        }
        console.log('link databse success');
    }
);
